﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 亚马逊订单
    /// </summary>
    /// 

    public class AMZOrderDTO
    {
        public string code { get; set; }
        public string message { get; set; }
        public string request_id { get; set; }
        public string response_time { get; set; }
        public int total { get; set; }
        public List<AMZOrder> data { get; set; }

    }


    public class AMZOrder
    {
        public string ID { get; set; }
        public string RowId { get; set; }

        /// <summary>
        /// 店铺id
        /// </summary>
        public string sid { get; set; }

        /// <summary>
        /// 店铺名称
        /// </summary>
        public string seller_name { get; set; }
        /// <summary>
        /// 亚马逊订单号
        /// </summary>
        public string amazon_order_id { get; set; }
        /// <summary>
        /// 订单状态
        /// </summary>
        public string order_status { get; set; }

        /// <summary>
        /// 订单金额	
        /// </summary>
        public string order_total_amount { get; set; }
        /// <summary>
        /// 配送方式：亚马逊订单-AFN，自发货-MFN
        /// </summary>
        public string fulfillment_channel { get; set; }
        /// <summary>
        /// 邮编	
        /// </summary>
        public string postal_code { get; set; }
        /// <summary>
        /// 退款状态：0 未退款，1 退款中，2 退款完成	
        /// </summary>
        private string _is_return; 
        public string is_return
        {
            get { return _is_return; }

            set
            {
                if (value == "0") _is_return = "未退款";
                else if (value == "1") _is_return = "退款中";
                else if (value == "2") _is_return = "退款完成";
                else _is_return = value;
            }
        }
        /// <summary>
        /// 是否多渠道订单	
        /// </summary>
        private string _is_mcf_order;
        public string is_mcf_order
        {
            get { return _is_return; }

            set
            {
                if (value == "0") _is_return = "否";
                else if (value == "1") _is_return = "是";
                else _is_return = value;
            }
        }

        /// <summary>
        /// 是否推广订单	
        /// </summary>
        private string _is_assessed;
        public string is_assessed
        {
            get { return _is_assessed; }

            set
            {
                if (value == "0") _is_assessed = "否";
                else if (value == "1") _is_assessed = "是";
                else _is_assessed = value;
            }
        }

        /// <summary>
        /// 是否换货订单	
        /// </summary>
        private string _is_replaced_order;
        public string is_replaced_order
        {
            get { return _is_replaced_order; }

            set
            {
                if (value == "0") _is_replaced_order = "否";
                else if (value == "1") _is_replaced_order = "是";
                else _is_replaced_order = value;
            }
        }

        /// <summary>
        /// 是否已换货订单	
        /// </summary>
        private string _is_replacement_order;
        public string is_replacement_order
        {
            get { return _is_replacement_order; }

            set
            {
                if (value == "0") _is_replacement_order = "否";
                else if (value == "1") _is_replacement_order = "是";
                else _is_replacement_order = value;
            }
        }

        /// <summary>
        /// 是否退货订单	
        /// </summary>
        private string _is_return_order;
        public string is_return_order
        {
            get { return _is_return_order; }

            set
            {
                if (value == "0") _is_return_order = "否";
                else if (value == "1") _is_return_order = "是";
                else _is_return_order = value;
            }
        }

        /// <summary>
        /// 币种	
        /// </summary>
        public string order_total_currency_code { get; set; }

        /// <summary>
        /// 销售渠道	
        /// </summary>
        public string sales_channel { get; set; }

        /// <summary>
        /// 物流运单号	
        /// </summary>
        public string tracking_number { get; set; }

        /// <summary>
        /// 退款金额(含币种)	
        /// </summary>
        public string refund_amount { get; set; }

        /// <summary>
        /// 订购时间【站点时间】	
        /// </summary>
        public string purchase_date_local { get; set; }

        /// <summary>
        /// 订购时间【UTC】
        /// </summary>
        public string purchase_date_local_utc { get; set; }
        /// <summary>
        /// 发货日期【亚马逊返回时间，不一定为站点时间】	
        /// </summary>
        public string shipment_date { get; set; }
        /// <summary>
        /// 发货日期【UTC】
        /// </summary>
        public string shipment_date_utc { get; set; }
        /// <summary>
        /// 发货日期【站点时间】	
        /// </summary>
        public string shipment_date_local { get; set; }
        /// <summary>
        /// 订单更新时间【站点时间】	
        /// </summary>
        public string last_update_date { get; set; }
        /// <summary>
        /// 订单更新时间【UTC】	
        /// </summary>
        public string last_update_date_utc { get; set; }
        /// <summary>
        /// 付款时间【亚马逊返回时间，不一定为站点时间】	
        /// </summary>
        public string posted_date { get; set; }
        /// <summary>
        /// 付款时间【UTC】
        /// </summary>
        public string posted_date_utc { get; set; }
        /// <summary>
        /// 订购时间【亚马逊返回时间，不一定为站点时间】
        /// </summary>
        public string purchase_date { get; set; }
        /// <summary>
        /// 订购时间【UTC】
        /// </summary>
        public string purchase_date_utc { get; set; }
        /// <summary>
        /// 发货时限【亚马逊返回时间，不一定为站点时间】
        /// </summary>
        public string earliest_ship_date { get; set; }
        /// <summary>
        /// 发货时限【UTC】	
        /// </summary>
        public string earliest_ship_date_utc { get; set; }
        /// <summary>
        /// 订单修改时间
        /// </summary>
        public string gmt_modified { get; set; }
        /// <summary>
        /// 订单修改时间【UTC】	
        /// </summary>
        public string gmt_modified_utc { get; set; }
    }
}
